package com.uuah.server.api.lifecycle;

import java.util.Collection;
import java.util.Set;

import com.uuah.exception.AbstractUuahException;
import com.uuah.server.api.IUuahContext;

public interface ILifecycleManager {
	Set getLifecycles();

	void setLifecycles(Set lifecycles);

	void registerLifecycle(ILifecyclePhase lci);

	void firePhase(IUuahContext uuahContext, String phase)
			throws AbstractUuahException;

	ILifecyclePhase applyPhase(Collection objects, String phase)
			throws AbstractUuahException;

	String getCurrentPhase();

	String getExecutingPhase();

	void reset();

	boolean isPhaseComplete(String phaseName);

	void applyCompletedPhases(Object object) throws AbstractUuahException;

	void checkPhase(String name) throws IllegalStateException;
}
